\hypertarget{class_alfar_engine_1_1_components_1_1_sprite}{
\section{\-Alfar\-Engine.\-Components.\-Sprite \-Class \-Reference}
\label{class_alfar_engine_1_1_components_1_1_sprite}\index{\-Alfar\-Engine.\-Components.\-Sprite@{\-Alfar\-Engine.\-Components.\-Sprite}}
}
\-Inheritance diagram for \-Alfar\-Engine.\-Components.\-Sprite\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{class_alfar_engine_1_1_components_1_1_sprite}
\end{center}
\end{figure}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_alfar_engine_1_1_components_1_1_sprite_a1e20195da413692ae2e1cfedcc417857}{
{\bfseries \-Sprite} (\hyperlink{class_alfar_engine_1_1_game_object}{\-Game\-Object} p\-Owner)}
\label{class_alfar_engine_1_1_components_1_1_sprite_a1e20195da413692ae2e1cfedcc417857}

\item 
void \hyperlink{class_alfar_engine_1_1_components_1_1_sprite_a94a5c43c2b0f6d1af47f9eb6be972738}{set\-Texture} (string p\-Path)
\begin{DoxyCompactList}\small\item\em \-Set the texture to the designated \hyperlink{class_alfar_engine_1_1_components_1_1_sprite}{\-Sprite}. \end{DoxyCompactList}\item 
void \hyperlink{class_alfar_engine_1_1_components_1_1_sprite_a88ae2d785285a71fcabf0f0861b8db11}{set\-Texture} (\hyperlink{class_alfar_engine_1_1_data_1_1_referenced_texture}{\-Referenced\-Texture} p\-Texture)
\begin{DoxyCompactList}\small\item\em \-Set the texture to the given \-Referenced\-Texture. \end{DoxyCompactList}\item 
\hypertarget{class_alfar_engine_1_1_components_1_1_sprite_a11672c064609a7952f71bb05b3a5ccb3}{
override void {\bfseries \-Update} (\-Microsoft.\-Xna.\-Framework.\-Game\-Time p\-Time)}
\label{class_alfar_engine_1_1_components_1_1_sprite_a11672c064609a7952f71bb05b3a5ccb3}

\item 
override void \hyperlink{class_alfar_engine_1_1_components_1_1_sprite_a466039b7ff2ef817ca1bf769e91252b1}{\-Draw} (\-Game\-Time p\-Time, \-Color p\-Color)
\begin{DoxyCompactList}\small\item\em \-Called when the engine \-Draw the component. \-Override to specify. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Protected \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_alfar_engine_1_1_components_1_1_sprite_af476181e85de85f3b1b96a4c11f7e75f}{
\hyperlink{class_alfar_engine_1_1_data_1_1_referenced_texture}{\-Referenced\-Texture} {\bfseries m\-Texture}}
\label{class_alfar_engine_1_1_components_1_1_sprite_af476181e85de85f3b1b96a4c11f7e75f}

\item 
\hypertarget{class_alfar_engine_1_1_components_1_1_sprite_a2d06a783e99f3457f4b0277a2c3e059e}{
\-Rectangle {\bfseries m\-Source\-Rect}}
\label{class_alfar_engine_1_1_components_1_1_sprite_a2d06a783e99f3457f4b0277a2c3e059e}

\item 
\hypertarget{class_alfar_engine_1_1_components_1_1_sprite_a83a91309c0d9439dd0cfb27514ca3cdf}{
\-Vector2 {\bfseries m\-Origin}}
\label{class_alfar_engine_1_1_components_1_1_sprite_a83a91309c0d9439dd0cfb27514ca3cdf}

\end{DoxyCompactItemize}
\subsection*{\-Properties}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_alfar_engine_1_1_data_1_1_referenced_texture}{\-Referenced\-Texture} \hyperlink{class_alfar_engine_1_1_components_1_1_sprite_a92fefa28f51b4cb8b47ed571d2c680de}{texture}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}
\begin{DoxyCompactList}\small\item\em \-Get the texture associated with this \hyperlink{class_alfar_engine_1_1_components_1_1_sprite}{\-Sprite}. \end{DoxyCompactList}\item 
\-Rectangle \hyperlink{class_alfar_engine_1_1_components_1_1_sprite_a88ab9ccbadf509e518b4fdc53b3c8595}{source\-Rect}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}
\begin{DoxyCompactList}\small\item\em \-Get the source rectange, meaning the part of the texture drawn. \-If it's \char`\"{}null\char`\"{}, then the entire texture is drawn. \end{DoxyCompactList}\item 
\-Vector2 \hyperlink{class_alfar_engine_1_1_components_1_1_sprite_a2a976853e17aa32cdef1127fb0038d1e}{center}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}
\begin{DoxyCompactList}\small\item\em \-Get the center (in local coodinate) of this sprite. \end{DoxyCompactList}\item 
\-Vector2 \hyperlink{class_alfar_engine_1_1_components_1_1_sprite_a0417fe807f769c43763ffff36b546670}{origin}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}
\begin{DoxyCompactList}\small\item\em \-Get the origin of the sprite in local coordinate. \-If null, m\-Origin is set to the center of the sprite (if no source\-Rect is set) or the center of source\-Rect if set. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{class_alfar_engine_1_1_components_1_1_sprite_a466039b7ff2ef817ca1bf769e91252b1}{
\index{\-Alfar\-Engine\-::\-Components\-::\-Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}!\-Draw@{\-Draw}}
\index{\-Draw@{\-Draw}!AlfarEngine::Components::Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}}
\subsubsection[{\-Draw}]{\setlength{\rightskip}{0pt plus 5cm}override void \-Alfar\-Engine.\-Components.\-Sprite.\-Draw (
\begin{DoxyParamCaption}
\item[{\-Game\-Time}]{p\-Time, }
\item[{\-Color}]{p\-Color}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{class_alfar_engine_1_1_components_1_1_sprite_a466039b7ff2ef817ca1bf769e91252b1}


\-Called when the engine \-Draw the component. \-Override to specify. 


\begin{DoxyParams}{\-Parameters}
{\em p\-Time} & \\
\hline
\end{DoxyParams}


\-Reimplemented from \hyperlink{class_alfar_engine_1_1_components_1_1_a_component_aaa010d944163f806c6f5c2c6528a0646}{\-Alfar\-Engine.\-Components.\-A\-Component}.

\hypertarget{class_alfar_engine_1_1_components_1_1_sprite_a94a5c43c2b0f6d1af47f9eb6be972738}{
\index{\-Alfar\-Engine\-::\-Components\-::\-Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}!set\-Texture@{set\-Texture}}
\index{set\-Texture@{set\-Texture}!AlfarEngine::Components::Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}}
\subsubsection[{set\-Texture}]{\setlength{\rightskip}{0pt plus 5cm}void \-Alfar\-Engine.\-Components.\-Sprite.\-set\-Texture (
\begin{DoxyParamCaption}
\item[{string}]{p\-Path}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_alfar_engine_1_1_components_1_1_sprite_a94a5c43c2b0f6d1af47f9eb6be972738}


\-Set the texture to the designated \hyperlink{class_alfar_engine_1_1_components_1_1_sprite}{\-Sprite}. 


\begin{DoxyParams}{\-Parameters}
{\em p\-Path} & \\
\hline
\end{DoxyParams}
\hypertarget{class_alfar_engine_1_1_components_1_1_sprite_a88ae2d785285a71fcabf0f0861b8db11}{
\index{\-Alfar\-Engine\-::\-Components\-::\-Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}!set\-Texture@{set\-Texture}}
\index{set\-Texture@{set\-Texture}!AlfarEngine::Components::Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}}
\subsubsection[{set\-Texture}]{\setlength{\rightskip}{0pt plus 5cm}void \-Alfar\-Engine.\-Components.\-Sprite.\-set\-Texture (
\begin{DoxyParamCaption}
\item[{{\bf \-Referenced\-Texture}}]{p\-Texture}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_alfar_engine_1_1_components_1_1_sprite_a88ae2d785285a71fcabf0f0861b8db11}


\-Set the texture to the given \-Referenced\-Texture. 


\begin{DoxyParams}{\-Parameters}
{\em p\-Texture} & \\
\hline
\end{DoxyParams}


\subsection{\-Property \-Documentation}
\hypertarget{class_alfar_engine_1_1_components_1_1_sprite_a2a976853e17aa32cdef1127fb0038d1e}{
\index{\-Alfar\-Engine\-::\-Components\-::\-Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}!center@{center}}
\index{center@{center}!AlfarEngine::Components::Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}}
\subsubsection[{center}]{\setlength{\rightskip}{0pt plus 5cm}\-Vector2 \-Alfar\-Engine.\-Components.\-Sprite.\-center\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}}}
\label{class_alfar_engine_1_1_components_1_1_sprite_a2a976853e17aa32cdef1127fb0038d1e}


\-Get the center (in local coodinate) of this sprite. 

\hypertarget{class_alfar_engine_1_1_components_1_1_sprite_a0417fe807f769c43763ffff36b546670}{
\index{\-Alfar\-Engine\-::\-Components\-::\-Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}!origin@{origin}}
\index{origin@{origin}!AlfarEngine::Components::Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}}
\subsubsection[{origin}]{\setlength{\rightskip}{0pt plus 5cm}\-Vector2 \-Alfar\-Engine.\-Components.\-Sprite.\-origin\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}}}
\label{class_alfar_engine_1_1_components_1_1_sprite_a0417fe807f769c43763ffff36b546670}


\-Get the origin of the sprite in local coordinate. \-If null, m\-Origin is set to the center of the sprite (if no source\-Rect is set) or the center of source\-Rect if set. 

\hypertarget{class_alfar_engine_1_1_components_1_1_sprite_a88ab9ccbadf509e518b4fdc53b3c8595}{
\index{\-Alfar\-Engine\-::\-Components\-::\-Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}!source\-Rect@{source\-Rect}}
\index{source\-Rect@{source\-Rect}!AlfarEngine::Components::Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}}
\subsubsection[{source\-Rect}]{\setlength{\rightskip}{0pt plus 5cm}\-Rectangle \-Alfar\-Engine.\-Components.\-Sprite.\-source\-Rect\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}}}
\label{class_alfar_engine_1_1_components_1_1_sprite_a88ab9ccbadf509e518b4fdc53b3c8595}


\-Get the source rectange, meaning the part of the texture drawn. \-If it's \char`\"{}null\char`\"{}, then the entire texture is drawn. 

\hypertarget{class_alfar_engine_1_1_components_1_1_sprite_a92fefa28f51b4cb8b47ed571d2c680de}{
\index{\-Alfar\-Engine\-::\-Components\-::\-Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}!texture@{texture}}
\index{texture@{texture}!AlfarEngine::Components::Sprite@{\-Alfar\-Engine\-::\-Components\-::\-Sprite}}
\subsubsection[{texture}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Referenced\-Texture} \-Alfar\-Engine.\-Components.\-Sprite.\-texture\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}}}
\label{class_alfar_engine_1_1_components_1_1_sprite_a92fefa28f51b4cb8b47ed571d2c680de}


\-Get the texture associated with this \hyperlink{class_alfar_engine_1_1_components_1_1_sprite}{\-Sprite}. 



\-The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
\-E\-:/\-X\-N\-A/alfar\-Engine/\-Alfar\-Engine/\-Components/\-Sprite.\-cs\end{DoxyCompactItemize}
